<?php
include_once "HeaderCommonElement.php";
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of HeadBean
 *
 * @author jhonny
 */
class HeadTag {
    private $title;
    private $links;
    private $script;
    private $medaData;
    public function HeadTag(){
        $this->links = new HeaderCommonElement();
        $this->script = new HeaderCommonElement();
        $this->medaData = new HeaderCommonElement();
    }
    public function getTitle() {
        return '    <title>'.$this->title.'</title>
';
    }
    public function setTitle($title) {
        $this->title = $title;
    }    
    public function getMetaData() {
        return $this->medaData->toString();
    }
    public function addLink( $value) {
        $this->links->add($value);
    }
    public function addScript( $value) {
        $this->script->add($value);
    }
    public function addMetaData( $value) {
        $this->medaData->add($value);
    }
    /*
    public function getLinks() {
        return $this->links->toString();
    }
     
     */
    public function getScript() {
        return $this->script->toString();
    }
    public function toString(){
        $strHead='';
        $strHead.='<HEAD>
';
        $strHead.=$this->getTitle();
        $strHead.=$this->medaData->toString();
        $strHead.=$this->links->toString();
        $strHead.=$this->script->toString();
        $strHead.='</HEAD>
';
        return $strHead;
    }
}
?>
